package org.coolsugar.annotation.domain;

import org.coolsugar.annotation.annos.PoliceAnno;

public abstract class People {
	public String name;
	public String age;
	
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getAge() {
		return age;
	}
	public void setAge(String age) {
		this.age = age;
	}
	
	public void stop() {
		PoliceAnno policeAnno = this.getClass().getAnnotation(PoliceAnno.class);
		if(null != policeAnno) {
			switch(policeAnno.level()) {
				case 1:
					System.out.println("you are surrounded");
					
					break;
				case 2:

				default:
					System.out.println("stop! hands up!");
					
					break;
			}
		} else {
			System.out.println("its none of my bisiness ");
		}
			
		this.say();
	}
	
	public abstract void say();
}
